package np13.earth;

import java.util.LinkedList;
import java.util.Map;

import np13.Slime;
import np13.SlimeQueue;
import np13.Smell;

/**
 * This class represents the atoll Funafitu. It consists of the queues (one for
 * each monad) and the origin habitat where all slimes are located initially.
 */
public class Funafitu {

	/**
	 * All existing queues, one for each smell.
	 */
	private final Map<Smell, SlimeQueue> queues;

	/**
	 * The origin habitat, where all slimes are located initially.
	 */
	private final LinkedList<Slime> originHabitat;

	/**
	 * Initializes the Funafitu.
	 * 
	 * @param queues
	 *            All slime queues, represented by a map from Smell to Queue.
	 * @param centralHousing
	 *            The origin habitat.
	 */
	public Funafitu(Map<Smell, SlimeQueue> queues,
			LinkedList<Slime> centralHousing) {
		this.queues = queues;
		this.originHabitat = centralHousing;
	}

	/**
	 * @return The origin habitat. No Slime will ever return to this habitat.
	 */
	public LinkedList<Slime> getOriginHabitat() {
		return originHabitat;
	}

	/**
	 * @return The queues, one for each smell. Use get(smell) to get a specific
	 *         queue.
	 */
	public Map<Smell, SlimeQueue> getQueues() {
		return queues;
	}
}
